package com.dljd.javase.t7.example4;

public class Car {

    private String pinpai;
    private String xilie;
    private String leixing;
    private int zhongliang;
    private int changdu;

    public Car(String pinpai, String xilie, String leixing, int zhongliang, int changdu) {
        this.pinpai = pinpai;
        this.xilie = xilie;
        this.leixing = leixing;
        this.zhongliang = zhongliang;
        this.changdu = changdu;
    }

    public String getPinpai() {
        return pinpai;
    }

    public void setPinpai(String pinpai) {
        this.pinpai = pinpai;
    }

    public String getXilie() {
        return xilie;
    }

    public void setXilie(String xilie) {
        this.xilie = xilie;
    }

    public String getLeixing() {
        return leixing;
    }

    public void setLeixing(String leixing) {
        this.leixing = leixing;
    }

    public int getZhongliang() {
        return zhongliang;
    }

    public void setZhongliang(int zhongliang) {
        this.zhongliang = zhongliang;
    }

    public int getChangdu() {
        return changdu;
    }

    public void setChangdu(int changdu) {
        this.changdu = changdu;
    }

    public Engine getEngine() {
        return engine;
    }

    public void setEngine(Engine engine) {
        this.engine = engine;
    }

    private Engine engine;//has-a

}

class Engine{
    public Engine(String ranliaoleixing, int qigangshu, int pailiang, String dianhuofangshi) {
        this.ranliaoleixing = ranliaoleixing;
        this.qigangshu = qigangshu;
        this.pailiang = pailiang;
        this.dianhuofangshi = dianhuofangshi;
    }

    public String getRanliaoleixing() {
        return ranliaoleixing;
    }

    public void setRanliaoleixing(String ranliaoleixing) {
        this.ranliaoleixing = ranliaoleixing;
    }

    public int getQigangshu() {
        return qigangshu;
    }

    public void setQigangshu(int qigangshu) {
        this.qigangshu = qigangshu;
    }

    public int getPailiang() {
        return pailiang;
    }

    public void setPailiang(int pailiang) {
        this.pailiang = pailiang;
    }

    public String getDianhuofangshi() {
        return dianhuofangshi;
    }

    public void setDianhuofangshi(String dianhuofangshi) {
        this.dianhuofangshi = dianhuofangshi;
    }

    private String ranliaoleixing;
    private int qigangshu;
    private int pailiang;
    private String dianhuofangshi;

}
